Skip to content

Fix filter_input() return value documentation#5381

Merged
kamil-tekiela merged 1 commit intophp:masterfrom
lacatoire:fix/issue-4361-filter-input-return-values
Apr 20, 2026
Merged

Fix filter_input() return value documentation#5381
kamil-tekiela merged 1 commit intophp:masterfrom
lacatoire:fix/issue-4361-filter-input-return-values

Conversation

@lacatoire
Copy link
Copy Markdown
Member

@lacatoire lacatoire commented Feb 18, 2026

Fixes #4361

filter_input() returns null when the variable is not set, not false. Also clarifies the FILTER_NULL_ON_FAILURE inverted behavior.

Happy to adjust if needed.

filter_input() returns null (not false) when the variable is not set.
Also clarify the FILTER_NULL_ON_FAILURE behavior which inverts the
return values: false when not set, null on filter failure.

Fixes php#4361
@kamil-tekiela kamil-tekiela merged commit f7e68a1 into php:master Apr 20, 2026
2 checks passed
@lacatoire lacatoire deleted the fix/issue-4361-filter-input-return-values branch April 21, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation of filter_input -> return values looks incorrect

2 participants